|
Data linkage If starting the report now, you would see that the list of orders remains the same for every client and contains all notes from the "Orders.db" table. That happens because we did not enable notes filtering in the "Orders" table. Let us revert to our data sources. Set the "MasterSource = DataSource1" property in the "Table2" component. Thus, we have set a "master-detail" connection. After that, a condition for subordinate source notes filtration should be established. To perform this, call the "MasterFields" property editor of the "Table2" component:
We need to link together two "CustNo" fields in both sources. To perform this, select the desired fields, and then click on "Add" button. Fields linkage will shift to the bottom window. After that, close the editor and click "خت." When starting a report, FastReport does the following. After allocating the next note from the master table (Customer), it will set the filter on the subordinate table (Orders). Only those notes, which would satisfy the "Orders.CustNo = Customer.CustNo" condition will remain in the table. That means that for each client only his/her orders will be displayed:
Reports, containing up to 6 data levels can be constructed in the similar way. |